#include "Block.h"
namespace Advanced2D
{
	Block::Block(void):Object()
	{
		sprBlock=new Sprite();
		sprBlock->setCurrentFrame(0);
		sprBlock->setWidth(20);
		sprBlock->setHeight(20);
		sprBlock->setColumns(5);
		sprBlock->setTotalFrames(5);
		this->setIsMoving(false);
		this->setObjectType(BLOCK_TYPE);
	}


	Block::~Block(void)
	{

	}
	void Block::setPostion(D3DXVECTOR3 pos)
	{
		this->position=pos;
		this->sprBlock->setPosition(pos);

	}
	void Block::setCurrentFrame(int frame)
	{
		this->currentFrame=frame;
		this->sprBlock->setCurrentFrame(frame);
	}
	void Block::draw(RECT screenRect)
	{
		sprBlock->draw(screenRect);

	}
	void Block::draw()
	{
		sprBlock->draw();
	}
	void Block::move()
	{
		sprBlock->move();
	
	}
	void Block::animate()
	{
		sprBlock->animate();

	}


}

